Skip to content

fix(fabric): include default warehouse on listed objects - #6042

Open
cmgoffena13 wants to merge 3 commits into
SQLMesh:mainfrom
cmgoffena13:fix/fabric-default-cache
Open

fix(fabric): include default warehouse on listed objects#6042
cmgoffena13 wants to merge 3 commits into
SQLMesh:mainfrom
cmgoffena13:fix/fabric-default-cache

Conversation

@cmgoffena13

@cmgoffena13 cmgoffena13 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Description

Closes #5970 -- second part. Aligns the objects list to standard with other engines. Fixes shared test.

  • Fabric treats the default warehouse as None so we skip reconnects. get_data_objects therefore returned catalog=None. Other engines return a real warehouse name.
  • Cache still uses schema.table (super().get_data_objects()). The warehouse name is filled in on the returned objects only.
  • Catalog name on the object -> catalog from the requested schema if present, otherwise current target / connected warehouse / configured default.

Also fixes a bug. A lazy restore to None would still have the connection to the last connection (planning). So any list of objects after that with no catalog would actually return objects for planning rather than the default catalog.

Test plan

  • test_get_data_objects on Fabric (query + df)
  • Unit: that list twice with safe_to_cache=True is one fetch
  • Unit: after a lazy restore to None, get_data_objects("dbo") is labeled planning correctly, not the default warehouse. get_data_objects("ci_abc.dbo") is still labeled ci_abc.
  • Unit: drop of a ci_abc object — two-part SQL, execute-time catalog is ci_abc (no reconnect if already default; switch and restore if on planning)

Checklist

  • I have run make style and fixed any issues
  • I have added tests for my changes (if applicable)
  • All existing tests pass (make fast-test)
  • My commits are signed off (git commit -s) per the DCO

Signed-off-by: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com>
Signed-off-by: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com>
Signed-off-by: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com>
@cmgoffena13 cmgoffena13 self-assigned this Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI Fix - Fabric CI Currently Failing

1 participant